package com.yenchingcheng;

import com.yenchingcheng.build.MealBuilder;
import com.yenchingcheng.entity.Meal;

/**
 * @Author Yenchingcheng
 * @Date 2023/7/31 14:32
 * @Description 测试类
 **/
public class Test {

    /** 测试结果：
     * VegMeal:
     * Item:VegBurger,Packing:Wrapper,Price:20.0
     * Item:CokeCola,Packing:瓶装,Price:3.0
     * total:23.0
     * ++++++++++++++++++++++++++
     * ChickenMeal:
     * Item:ChickenBurger,Packing:Wrapper,Price:25.0
     * Item:PepsiCola,Packing:瓶装,Price:3.0
     * total:28.0
     */
    public static void main(String[] args) {
        MealBuilder builder = new MealBuilder();

        Meal meal = builder.prepareVegMeal();
        System.out.println("VegMeal:");
        meal.showMeal();
        System.out.println("total:" + meal.getCost());

        System.out.println("++++++++++++++++++++++++++");

        Meal meal1 = builder.prepareChickenMeal();
        System.out.println("ChickenMeal:");
        meal1.showMeal();
        System.out.println("total:" + meal1.getCost());
    }
}
